package com.loong.data.controller.forehead;

import com.loong.common.mvc.BaseForeheadController;
import com.loong.common.rest.Result;
import com.loong.data.common.forehead.param.GoodsBrandAndPageForeheadParam;
import com.loong.data.handler.GoodsBrandHandler;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description: 处理前台有关商品品牌的请求
 * @Author: LiuQun
 * @Date: 2020/12/5 16:45
 */
@RestController
@RequestMapping("forehead/data/goodsBrand")
public class GoodsBrandForeheadController extends BaseForeheadController {

    @Resource
    private GoodsBrandHandler brandHandler;

    /**
     * 分页查询商品品牌
     * @param param 查询参数
     * @return 响应的结果
     */
    @PostMapping("pageQuery/GoodsBrandList")
    public Result pageQueryGoodsBrand(@RequestBody GoodsBrandAndPageForeheadParam param){
        return handlerExecutor.execute(() -> brandHandler.foreheadFindGoodsBrandByParam(param));
    }
}
